package com.diver.flinkdemo.entity.xxt;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * 短信验证码
 * Created by wenjun on 2018/7/3.
 */
@ApiModel(value = "sms_code对象", description = "手机短信验证码表")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("sms_code")
public class SmsCode implements Serializable {

    // 唯一主键 [主键]
    @TableId(type = IdType.UUID)
    @ApiModelProperty(value = "主键")
    private String id;

    // 接收手机号
    @ApiModelProperty(value = "手机号")
    private String phone;

    // 验证码
    @ApiModelProperty(value = "验证码")
    private String validateCode;

    // 短信是否已经验证
    @ApiModelProperty(value = "是否已经验证")
    private Boolean validated;

    // 验证码创建时间
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
//    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
}
